package com.from.menlo.park;


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class EDiary extends Activity {
    private static final int ACTION_TAKE_PICTURE = 0;
    private static final int ACTION_TAKE_LOCATION = 1;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        Button takePicture = (Button) findViewById(R.id.takePicture);
        takePicture.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent(EDiary.this,
						CameraActivity.class);
				intent.setAction(Intent.ACTION_GET_CONTENT);  
				startActivityForResult(intent, ACTION_TAKE_PICTURE);
			}
		});
        Button takeLocation = (Button) findViewById(R.id.takeLocation);
        takeLocation.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent(EDiary.this,
						LocationEBrain.class);
				intent.setAction(Intent.ACTION_GET_CONTENT);  
				startActivityForResult(intent, ACTION_TAKE_LOCATION);
			}
		});
        Button authoring = (Button) findViewById(R.id.authoring);
        takeLocation.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent(EDiary.this,
						Authoring.class);
				intent.setAction(Intent.ACTION_GET_CONTENT);  
				startActivityForResult(intent, ACTION_TAKE_LOCATION);
			}
		});
        
        Button calendar = (Button)findViewById(R.id.calendar);
        calendar.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				startActivity(new Intent(EDiary.this,CalendarActivity.class));
				
			}
		});
    }
}